﻿using SalesPages.DomainModel;
using SalesPages.DomainModel.SearchCriteria;
using SalesPages.Infrastructure.IManager;
using SalesPages.Infrastructure.IRepository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SalesPages.Manager
{
    public class ContactUsManager : IContactUsManager
    {
        private IContactUsRepository contactUsRepository;

        public ContactUsManager(IContactUsRepository contactUsRepository)
        {
            this.contactUsRepository = contactUsRepository;
        }


        public ContactUs FindByKey(int key)
        {
            return contactUsRepository.FindByKey(key);
        }

        public void Add(ContactUs lead)
        {
            contactUsRepository.Insert(lead);
        }

        public void Delete(int id)
        {
            contactUsRepository.Delete(c => c.Id.Equals(id));
        }

        public List<ContactUs> Search(ContactUsSearchCriteria criteria)
        {
            throw new NotImplementedException();
        }
    }
}
